/**
 * *******************************************
 * user: zmq
 * describe:   错误代码模块
 * created:
 * date: 2021/8/31
 * *******************************************
 */


import {IServerRes} from "../consts/interface";

export type SERVER_ERROR = { [type: string]: IServerRes }
export let ERRORCODE: SERVER_ERROR = {

    // mysql
    MYSQL_GET_ERROR: {code: 1, errStr: '查询数据异常'},
    MYSQL_ADD_ERROR: {code: 2, errStr: '插入数据异常'},

    // gate
    GATE_ACCOUNT_IS_EXIST: {code: 1000, errStr: '不允许重复注册账号'},
    GATE_ACCOUNT_NOT_EXIST: {code: 1001, errStr: '账号不存在'},
    GATE_PWD_IS_WRONG: {code: 1002, errStr: '密码错误'},
    GATE_NOT_ALLOW_GM_COMMAND: {code: 1003, errStr: '不允许注册账号'},

    // connctor
    CONNECTOR_ERROR: {code: 2000, errStr: '服务器维护'},
    CONNECTOR_ACCOUNT_IS_ERROR: {code: 20001, errStr: '不允许无效账号'},

    // route
    ROUTE_ERROR: {code: 3000, errStr: '路由异常'},

    // area
    AREA_SERVER_IS_MAINTAIN : {code: 4000, errStr: '服务器维护'},
    AREA_ALREADY_ROLE_LIMIT_NUM : {code: 4001, errStr: '服务器爆满，无法创建角色'},
    AREA_NICKNAME_IS_ERR : {code: 4002, errStr: '不允许无效昵称'},
    AREA_REPEAT_CREATE_ROLE : {code: 4003, errStr: '不允许重复创建角色'},

}